home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / CDUNGEON / !CDUNGEON / c / GDT < prev    next >
Text File  |  1991-05-20  |  18KB  |  789 lines

  1. /* GDT- GAME DEBUGGING TOOL */
  2.  
  3. /*COPYRIGHT 1980, INFOCOM COMPUTERS AND COMMUNICATIONS, CAMBRIDGE MA. 02142*/
  4. /* ALL RIGHTS RESERVED, COMMERCIAL USAGE STRICTLY PROHIBITED */
  5. /* WRITTEN BY R. M. SUPNIK */
  6.  
  7. #include <stdio.h>
  8. #include <ctype.h>
  9. #include "funcs.h"
  10. #include "vars.h"
  11. #include "parse.h"
  12.  
  13. #ifdef ALLOW_GDT
  14.  
  15. void gdt_()
  16. {
  17.     /* Initialized data */
  18.  
  19.     const integer cmdmax = 38;
  20.     const char *dbgcmd =
  21.         "DRDODADCDXDHDLDVDFDSAFHENRNTNCNDRRRTRCRDTKEXARAOAAACAXAVD2DNANDMDTAHDPPDDZAZ";
  22.     static const integer argtyp[38] = { 2,2,2,2,2,0,0,2,2,0,1,0,0,0,0,0,0,
  23.         0,0,0,1,0,3,3,3,3,1,3,2,2,1,2,1,0,0,0,0,1 };
  24.  
  25.     /* System generated locals */
  26.     integer i__1, i__2;
  27.  
  28.     /* Local variables */
  29.     integer i, j, k, l, l1;
  30.     char cmd[3];
  31.     integer fmax, smax;
  32.     char buf[80];
  33.     char *z;
  34.  
  35. /* FIRST, VALIDATE THAT THE CALLER IS AN IMPLEMENTER. */
  36.  
  37.     fmax = 46;
  38. /*                         !SET ARRAY LIMITS. */
  39.     smax = 22;
  40.  
  41.     if (debug_1.gdtflg != 0) {
  42.     goto L2000;
  43.     }
  44. /*                         !IF OK, SKIP. */
  45.     more_output("You are not an authorized user.");
  46. /*                         !NOT AN IMPLEMENTER. */
  47.     return;
  48. /*                         !BOOT HIM OFF */
  49.  
  50. /* GDT, PAGE 2A */
  51.  
  52. /* HERE TO GET NEXT COMMAND */
  53.  
  54. L2000:
  55.     printf("GDT>");
  56. /*                         !OUTPUT PROMPT. */
  57.     (void) fflush(stdout);
  58.     (void) fgets(buf, sizeof buf, stdin);
  59.     more_input();
  60.     cmd[0] = ' ';
  61.     cmd[1] = ' ';
  62.     sscanf(buf, "%2s", cmd);
  63. /*                         !GET COMMAND. */
  64.     if (cmd[0] == '\0')
  65.     goto L2000;
  66. /*                         !IGNORE BLANKS. */
  67.     if (islower(cmd[0]))
  68.     cmd[0] = toupper(cmd[0]);
  69.     if (islower(cmd[1]))
  70.     cmd[1] = toupper(cmd[1]);
  71.     i__1 = cmdmax;
  72.     for (i = 1; i <= i__1; ++i) {
  73. /*                         !LOOK IT UP. */
  74.     if (cmd[0] == dbgcmd[(i - 1) << 1] &&
  75.         cmd[1] == dbgcmd[((i - 1) << 1) + 1]) {
  76.         goto L2300;
  77.     }
  78. /*                         !FOUND? */
  79. /* L2100: */
  80.     }
  81. L2200:
  82.     more_output("?");
  83. /*                         !NO, LOSE. */
  84.     goto L2000;
  85.  
  86. /* L230: */
  87. /* L240: */
  88. /* L225: */
  89. /* L235: */
  90. /* L245: */
  91.  
  92. L2300:
  93.     switch (argtyp[i - 1] + 1) {
  94.     case 1:  goto L2400;
  95.     case 2:  goto L2500;
  96.     case 3:  goto L2600;
  97.     case 4:  goto L2700;
  98.     }
  99. /*                         !BRANCH ON ARG TYPE. */
  100.     goto L2200;
  101. /*                         !ILLEGAL TYPE. */
  102.  
  103. L2700:
  104.     printf("Idx,Ary:  ");
  105. /*                         !TYPE 3, REQUEST ARRAY COORDS. */
  106.     (void) fflush(stdout);
  107.     (void) fgets(buf, sizeof buf, stdin);
  108.     more_input();
  109.     for (z = buf; *z != '\0'; z++)
  110.     if (*z == ',')
  111.         *z = ' ';
  112.     j = 0;
  113.     k = 0;
  114.     sscanf(buf, "%d %d", &j, &k);
  115.     goto L2400;
  116.  
  117. L2600:
  118.     printf("Limits:   ");
  119. /*                         !TYPE 2, READ BOUNDS. */
  120.     (void) fflush(stdout);
  121.     (void) fgets(buf, sizeof buf, stdin);
  122.     more_input();
  123.     for (z = buf; *z != '\0'; z++)
  124.     if (*z == ',')
  125.         *z = ' ';
  126.     j = 0;
  127.     k = 0;
  128.     sscanf(buf, "%d %d", &j, &k);
  129.     if (k == 0) {
  130.     k = j;
  131.     }
  132.     goto L2400;
  133.  
  134. L2500:
  135.     printf("Entry:    ");
  136. /*                         !TYPE 1, READ ENTRY NO. */
  137.     (void) fflush(stdout);
  138.     (void) fgets(buf, sizeof buf, stdin);
  139.     more_input();
  140.     j = 0;
  141.     sscanf(buf, "%d", &j);
  142.  
  143. L2400:
  144.     switch (i) {
  145.     case 1:  goto L10000;
  146.     case 2:  goto L11000;
  147.     case 3:  goto L12000;
  148.     case 4:  goto L13000;
  149.     case 5:  goto L14000;
  150.     case 6:  goto L15000;
  151.     case 7:  goto L16000;
  152.     case 8:  goto L17000;
  153.     case 9:  goto L18000;
  154.     case 10:  goto L19000;
  155.     case 11:  goto L20000;
  156.     case 12:  goto L21000;
  157.     case 13:  goto L22000;
  158.     case 14:  goto L23000;
  159.     case 15:  goto L24000;
  160.     case 16:  goto L25000;
  161.     case 17:  goto L26000;
  162.     case 18:  goto L27000;
  163.     case 19:  goto L28000;
  164.     case 20:  goto L29000;
  165.     case 21:  goto L30000;
  166.     case 22:  goto L31000;
  167.     case 23:  goto L32000;
  168.     case 24:  goto L33000;
  169.     case 25:  goto L34000;
  170.     case 26:  goto L35000;
  171.     case 27:  goto L36000;
  172.     case 28:  goto L37000;
  173.     case 29:  goto L38000;
  174.     case 30:  goto L39000;
  175.     case 31:  goto L40000;
  176.     case 32:  goto L41000;
  177.     case 33:  goto L42000;
  178.     case 34:  goto L43000;
  179.     case 35:  goto L44000;
  180.     case 36:  goto L45000;
  181.     case 37:  goto L46000;
  182.     case 38:  goto L47000;
  183.     }
  184.     goto L2200;
  185. /*                         !WHAT??? */
  186. /* GDT, PAGE 3 */
  187.  
  188. /* DR-- DISPLAY ROOMS */
  189.  
  190. L10000:
  191.     if (! (j > 0 && j <= rooms_1.rlnt && (k > 0 && k <= rooms_1.rlnt) && j <= 
  192.         k)) {
  193.     goto L2200;
  194.     }
  195. /*                         !ARGS VALID? */
  196.     more_output("RM#  DESC1  DESC2  EXITS ACTION  VALUE  FLAGS");
  197. /*                         !COL HDRS. */
  198.     i__1 = k;
  199.     for (i = j; i <= i__1; ++i) {
  200.     more_output(NULL);
  201.     printf("%3d", i);
  202.     for (l = 1; l <= 6; ++l)
  203.         printf(" %6d", eqr[i + l * 200 - 201]);
  204.     printf("\n");
  205.  
  206. /* L10100: */
  207.     }
  208.     goto L2000;
  209.  
  210.  
  211. /* DO-- DISPLAY OBJECTS */
  212.  
  213. L11000:
  214.     if (! (j > 0 && j <= objcts_1.olnt && (k > 0 && k <= objcts_1.olnt) && j 
  215.         <= k)) {
  216.     goto L2200;
  217.     }
  218. /*                         !ARGS VALID? */
  219.     more_output("OB# DESC1 DESC2 DESCO ACT FLAGS1 FLAGS2 FVL TVL      SIZE CAPAC ROOM ADV CON  READ");
  220. /*                         !COL HDRS */
  221.     i__1 = k;
  222.     for (i = j; i <= i__1; ++i) {
  223.     more_output(NULL);
  224.     printf("%3d%6d%6d%6d%4d%7d%7d%4d%4d%6d%6d %4d%4d%4d%6d\n",
  225.         i, eqo[i + 1 * 220 - 221], eqo[i + 2 * 220 - 221],
  226.         eqo[i + 3 * 220 - 221], eqo[i + 4 * 220 - 221],
  227.         eqo[i + 5 * 220 - 221], eqo[i + 6 * 220 - 221],
  228.         eqo[i + 7 * 220 - 221], eqo[i + 8 * 220 - 221],
  229.         eqo[i + 9 * 220 - 221], eqo[i + 10 * 220 - 221],
  230.         eqo[i + 11 * 220 - 221], eqo[i + 12 * 220 - 221],
  231.         eqo[i + 13 * 220 - 221], eqo[i + 14 * 220 - 221]);
  232.  
  233. /* L11100: */
  234.     }
  235.     goto L2000;
  236.  
  237.  
  238. /* DA-- DISPLAY ADVENTURERS */
  239.  
  240. L12000:
  241.     if (! (j > 0 && j <= advs_1.alnt && (k > 0 && k <= advs_1.alnt) && j <= k)
  242.         ) {
  243.     goto L2200;
  244.     }
  245. /*                         !ARGS VALID? */
  246.     more_output("AD#   ROOM  SCORE  VEHIC OBJECT ACTION  STREN  FLAGS");
  247.     i__1 = k;
  248.     for (i = j; i <= i__1; ++i) {
  249.     more_output(NULL);
  250.     printf("%3d", i);
  251.     for (l = 1; l <= 7; ++l)
  252.         printf(" %6d", eqa[i + (l << 2) -  5]);
  253.     printf("\n");
  254. /* L12100: */
  255.     }
  256.     goto L2000;
  257.  
  258.  
  259. /* DC-- DISPLAY CLOCK EVENTS */
  260.  
  261. L13000:
  262.     if (! (j > 0 && j <= cevent_1.clnt && (k > 0 && k <= cevent_1.clnt) && j 
  263.         <= k)) {
  264.     goto L2200;
  265.     }
  266. /*                         !ARGS VALID? */
  267.     more_output("CL#   TICK ACTION  FLAG");
  268.     i__1 = k;
  269.     for (i = j; i <= i__1; ++i) {
  270.     more_output(NULL);
  271.     printf("%3d %6d %6d     %c\n", i, eqc[i + 1 * 25 - 26],
  272.         eqc[i + 2 * 25 - 26],
  273.         cevent_1.cflag[i - 1] ? 'T' : 'F');
  274. /* L13100: */
  275.     }
  276.     goto L2000;
  277.  
  278.  
  279. /* DX-- DISPLAY EXITS */
  280.  
  281. L14000:
  282.     if (! (j > 0 && j <= exits_1.xlnt && (k > 0 && k <= exits_1.xlnt) && j <= 
  283.         k)) {
  284.     goto L2200;
  285.     }
  286. /*                         !ARGS VALID? */
  287.     more_output("  RANGE   CONTENTS");
  288. /*                         !COL HDRS. */
  289.     i__1 = k;
  290.     for (i = j; i <= i__1; i += 10) {
  291. /*                         !TEN PER LINE. */
  292. /* Computing MIN */
  293.     i__2 = i + 9;
  294.     l = min(i__2,k);
  295. /*                         !COMPUTE END OF LINE. */
  296.     more_output(NULL);
  297.     printf("%3d-%3d  ", i, l);
  298.     for (l1 = i; l1 <= l; ++l1)
  299.         printf("%7d", exits_1.travel[l1 - 1]);
  300.     printf("\n");
  301. /* L14100: */
  302.     }
  303.     goto L2000;
  304.  
  305.  
  306. /* DH-- DISPLAY HACKS */
  307.  
  308. L15000:
  309.     more_output(NULL);
  310.     printf("THFPOS= %d, THFFLG= %c, THFACT= %c\n",
  311.        hack_1.thfpos, hack_1.thfflg ? 'T' : 'F',
  312.        hack_1.thfact ? 'T' : 'F');
  313.     more_output(NULL);
  314.     printf("SWDACT= %c, SWDSTA= %d\n", hack_1.swdact ? 'T' : 'F',
  315.        hack_1.swdsta);
  316.     goto L2000;
  317.  
  318.  
  319. /* DL-- DISPLAY LENGTHS */
  320.  
  321. L16000:
  322.     more_output(NULL);
  323.     printf("R=%d, X=%d, O=%d, C=%d\n", rooms_1.rlnt, exits_1.xlnt,
  324.        objcts_1.olnt, cevent_1.clnt);
  325.     more_output(NULL);
  326.     printf("V=%d, A=%d, M=%d, R2=%d\n", vill_1.vlnt, advs_1.alnt,
  327.        rmsg_1.mlnt, oroom2_1.r2lnt);
  328.     more_output(NULL);
  329.     printf("MBASE=%d, STRBIT=%d\n", star_1.mbase, star_1.strbit);
  330.     goto L2000;
  331.  
  332.  
  333. /* DV-- DISPLAY VILLAINS */
  334.  
  335. L17000:
  336.     if (! (j > 0 && j <= vill_1.vlnt && (k > 0 && k <= vill_1.vlnt) && j <= k)
  337.         ) {
  338.     goto L2200;
  339.     }
  340. /*                         !ARGS VALID? */
  341.     more_output("VL# OBJECT   PROB   OPPS   BEST  MELEE");
  342. /*                         !COL HDRS */
  343.     i__1 = k;
  344.     for (i = j; i <= i__1; ++i) {
  345.     more_output(NULL);
  346.     printf("%3d", i);
  347.     for (l = 1; l <= 5; ++l)
  348.         printf(" %6d", eqv[i + (l << 2) - 5]);
  349.     printf("\n");
  350. /* L17100: */
  351.     }
  352.     goto L2000;
  353.  
  354.  
  355. /* DF-- DISPLAY FLAGS */
  356.  
  357. L18000:
  358.     if (! (j > 0 && j <= fmax && (k > 0 && k <= fmax) && j <= k)) {
  359.     goto L2200;
  360.     }
  361. /*                         !ARGS VALID? */
  362.     i__1 = k;
  363.     for (i = j; i <= i__1; ++i) {
  364.     more_output(NULL);
  365.     printf("Flag #%-2d = %c\n", i, flags[i - 1] ? 'T' : 'F');
  366. /* L18100: */
  367.     }
  368.     goto L2000;
  369.  
  370.  
  371. /* DS-- DISPLAY STATE */
  372.  
  373. L19000:
  374.     more_output(NULL);
  375.     printf("Parse vector= %6d %6d %6d      %c %6d\n",
  376.        prsvec_1.prsa, prsvec_1.prso, prsvec_1.prsi,
  377.        prsvec_1.prswon ? 'T' : 'F', prsvec_1.prscon);
  378.     more_output(NULL);
  379.     printf("Play vector=  %6d %6d      %c\n", play_1.winner, play_1.here,
  380.         play_1.telflg ? 'T' : 'F');
  381.     more_output(NULL);
  382.     printf("State vector= %6d %6d %6d %6d %6d %6d %6d %6d %6d\n",
  383.        state_1.moves, state_1.deaths, state_1.rwscor, state_1.mxscor,
  384.        state_1.mxload, state_1.ltshft, state_1.bloc, state_1.mungrm,
  385.        state_1.hs);
  386.     more_output(NULL);
  387.     printf("              %6d %6d\n", state_1.egscor, state_1.egmxsc);
  388.     more_output(NULL);
  389.     printf("Scol vector=  %6d %6d %6d\n", screen_1.fromdr,
  390.        screen_1.scolrm, screen_1.scolac);
  391.     goto L2000;
  392.  
  393. /* GDT, PAGE 4 */
  394.  
  395. /* AF-- ALTER FLAGS */
  396.  
  397. L20000:
  398.     if (! (j > 0 && j <= fmax)) {
  399.     goto L2200;
  400.     }
  401. /*                         !ENTRY NO VALID? */
  402.     printf("Old= %c      New= ", flags[j - 1] ? 'T' : 'F');
  403. /*                         !TYPE OLD, GET NEW. */
  404.     (void) fflush(stdout);
  405.     (void) fgets(buf, sizeof buf, stdin);
  406.     more_input();
  407.     for (z = buf; *z != '\0'; z++) {
  408.     if (! isspace(*z)) {
  409.         if (*z == 't' || *z == 'T')
  410.         flags[j - 1] = 1;
  411.         else if (*z == 'f' || *z == 'F')
  412.         flags[j - 1] = 0;
  413.         break;
  414.     }
  415.     }
  416.     goto L2000;
  417.  
  418.  
  419. /* 21000-- HELP */
  420.  
  421. L21000:
  422.     more_output("Valid commands are:");
  423.     more_output("AA- Alter ADVS          DR- Display ROOMS");
  424.     more_output("AC- Alter CEVENT        DS- Display state");
  425.     more_output("AF- Alter FINDEX        DT- Display text");
  426.     more_output("AH- Alter HERE          DV- Display VILLS");
  427.     more_output("AN- Alter switches      DX- Display EXITS");
  428.     more_output("AO- Alter OBJCTS        DZ- Display PUZZLE");
  429.     more_output("AR- Alter ROOMS         D2- Display ROOM2");
  430.     more_output("AV- Alter VILLS         EX- Exit");
  431.     more_output("AX- Alter EXITS         HE- Type this message");
  432.     more_output("AZ- Alter PUZZLE        NC- No cyclops");
  433.     more_output("DA- Display ADVS        ND- No deaths");
  434.     more_output("DC- Display CEVENT      NR- No robber");
  435.     more_output("DF- Display FINDEX      NT- No troll");
  436.     more_output("DH- Display HACKS       PD- Program detail");
  437.     more_output("DL- Display lengths     RC- Restore cyclops");
  438.     more_output("DM- Display RTEXT       RD- Restore deaths");
  439.     more_output("DN- Display switches    RR- Restore robber");
  440.     more_output("DO- Display OBJCTS      RT- Restore troll");
  441.     more_output("DP- Display parser      TK- Take");
  442.     goto L2000;
  443.  
  444. /* NR-- NO ROBBER */
  445.  
  446. L22000:
  447.     hack_1.thfflg = FALSE_;
  448. /*                         !DISABLE ROBBER. */
  449.     hack_1.thfact = FALSE_;
  450.     newsta_(oindex_1.thief, 0, 0, 0, 0);
  451. /*                         !VANISH THIEF. */
  452.     more_output("No robber.");
  453.     goto L2000;
  454.  
  455. /* NT-- NO TROLL */
  456.  
  457. L23000:
  458.     findex_1.trollf = TRUE_;
  459.     newsta_(oindex_1.troll, 0, 0, 0, 0);
  460.     more_output("No troll.");
  461.     goto L2000;
  462.  
  463. /* NC-- NO CYCLOPS */
  464.  
  465. L24000:
  466.     findex_1.cyclof = TRUE_;
  467.     newsta_(oindex_1.cyclo, 0, 0, 0, 0);
  468.     more_output("No cyclops.");
  469.     goto L2000;
  470.  
  471. /* ND-- IMMORTALITY MODE */
  472.  
  473. L25000:
  474.     debug_1.dbgflg = 1;
  475.     more_output("No deaths.");
  476.     goto L2000;
  477.  
  478. /* RR-- RESTORE ROBBER */
  479.  
  480. L26000:
  481.     hack_1.thfact = TRUE_;
  482.     more_output("Restored robber.");
  483.     goto L2000;
  484.  
  485. /* RT-- RESTORE TROLL */
  486.  
  487. L27000:
  488.     findex_1.trollf = FALSE_;
  489.     newsta_(oindex_1.troll, 0, rindex_1.mtrol, 0, 0);
  490.     more_output("Restored troll.");
  491.     goto L2000;
  492.  
  493. /* RC-- RESTORE CYCLOPS */
  494.  
  495. L28000:
  496.     findex_1.cyclof = FALSE_;
  497.     findex_1.magicf = FALSE_;
  498.     newsta_(oindex_1.cyclo, 0, rindex_1.mcycl, 0, 0);
  499.     more_output("Restored cyclops.");
  500.     goto L2000;
  501.  
  502.  
  503. /* RD-- MORTAL MODE */
  504.  
  505. L29000:
  506.     debug_1.dbgflg = 0;
  507.     more_output("Restored deaths.");
  508.     goto L2000;
  509.  
  510. /* GDT, PAGE 5 */
  511.  
  512. /* TK-- TAKE */
  513.  
  514. L30000:
  515.     if (! (j > 0 && j <= objcts_1.olnt)) {
  516.     goto L2200;
  517.     }
  518. /*                         !VALID OBJECT? */
  519.     newsta_(j, 0, 0, 0, play_1.winner);
  520. /*                         !YES, TAKE OBJECT. */
  521.     more_output("Taken.");
  522. /*                         !TELL. */
  523.     goto L2000;
  524.  
  525.  
  526. /* EX-- GOODBYE */
  527.  
  528. L31000:
  529.     prsvec_1.prscon = 1;
  530.     return;
  531.  
  532. /* AR--    ALTER ROOM ENTRY */
  533.  
  534. L32000:
  535.     if (! (j > 0 && j <= rooms_1.rlnt && (k > 0 && k <= 5))) {
  536.     goto L2200;
  537.     }
  538. /*                         !INDICES VALID? */
  539.     printf("Old = %6d      New = ", eqr[j + k * 200 - 201]);
  540. /*                         !TYPE OLD, GET NEW. */
  541.     (void) fflush(stdout);
  542.     (void) fgets(buf, sizeof buf, stdin);
  543.     more_input();
  544.     sscanf(buf, "%d", &eqr[j + k * 200 - 201]);
  545.     goto L2000;
  546.  
  547.  
  548. /* AO-- ALTER OBJECT ENTRY */
  549.  
  550. L33000:
  551.     if (! (j > 0 && j <= objcts_1.olnt && (k > 0 && k <= 14))) {
  552.     goto L2200;
  553.     }
  554. /*                         !INDICES VALID? */
  555.     printf("Old = %6d      New = ", eqo[j + k * 200 - 201]);
  556.     (void) fflush(stdout);
  557.     (void) fgets(buf, sizeof buf, stdin);
  558.     more_input();
  559.     sscanf(buf, "%d", &eqo[j + k * 220 - 221]);
  560.     goto L2000;
  561.  
  562. /* AA-- ALTER ADVS ENTRY */
  563.  
  564. L34000:
  565.     if (! (j > 0 && j <= advs_1.alnt && (k > 0 && k <= 7))) {
  566.     goto L2200;
  567.     }
  568. /*                         !INDICES VALID? */
  569.     printf("Old = %6d      New = ", eqa[j + (k << 2) - 5]);
  570.     (void) fflush(stdout);
  571.     (void) fgets(buf, sizeof buf, stdin);
  572.     more_input();
  573.     sscanf(buf, "%d", &eqa[j + (k << 2) - 5]);
  574.     goto L2000;
  575.  
  576. /* AC-- ALTER CLOCK EVENTS */
  577.  
  578. L35000:
  579.     if (! (j > 0 && j <= cevent_1.clnt && (k > 0 && k <= 3))) {
  580.     goto L2200;
  581.     }
  582. /*                         !INDICES VALID? */
  583.     if (k == 3) {
  584.     goto L35500;
  585.     }
  586. /*                         !FLAGS ENTRY? */
  587.     printf("Old = %6d      New = ", eqc[j + k * 25 - 26]);
  588.     (void) fflush(stdout);
  589.     (void) fgets(buf, sizeof buf, stdin);
  590.     more_input();
  591.     sscanf(buf, "%d", &eqc[j + k * 25 - 26]);
  592.     goto L2000;
  593.  
  594. L35500:
  595.     (void) fflush(stdout);
  596.     (void) fgets(buf, sizeof buf, stdin);
  597.     more_input();
  598.     for (z = buf; *z != '\0'; z++) {
  599.     if (! isspace(*z)) {
  600.         if (*z == 't' || *z == 'T')
  601.         cevent_1.cflag[j - 1] = 1;
  602.         else if (*z == 'f' || *z == 'F')
  603.         cevent_1.cflag[j - 1] = 0;
  604.         break;
  605.     }
  606.     }
  607.     goto L2000;
  608. /* GDT, PAGE 6 */
  609.  
  610. /* AX-- ALTER EXITS */
  611.  
  612. L36000:
  613.     if (! (j > 0 && j <= exits_1.xlnt)) {
  614.     goto L2200;
  615.     }
  616. /*                         !ENTRY NO VALID? */
  617.     printf("Old= %6d     New= ", exits_1.travel[j - 1]);
  618.     (void) fflush(stdout);
  619.     (void) fgets(buf, sizeof buf, stdin);
  620.     more_input();
  621.     sscanf(buf, "%d", &exits_1.travel[j - 1]);
  622.     goto L2000;
  623.  
  624.  
  625. /* AV-- ALTER VILLAINS */
  626.  
  627. L37000:
  628.     if (! (j > 0 && j <= vill_1.vlnt && (k > 0 && k <= 5))) {
  629.     goto L2200;
  630.     }
  631. /*                         !INDICES VALID? */
  632.     printf("Old = %6d      New= ", eqv[j + (k << 2) - 5]);
  633.     (void) fflush(stdout);
  634.     (void) fgets(buf, sizeof buf, stdin);
  635.     more_input();
  636.     sscanf(buf, "%d", &eqv[j + (k << 2) - 5]);
  637.     goto L2000;
  638.  
  639. /* D2-- DISPLAY ROOM2 LIST */
  640.  
  641. L38000:
  642.     if (! (j > 0 && j <= oroom2_1.r2lnt && (k > 0 && k <= oroom2_1.r2lnt) && 
  643.         j <= k)) {
  644.     goto L2200;
  645.     }
  646.     i__1 = k;
  647.     for (i = j; i <= i__1; ++i) {
  648.     more_output(NULL);
  649.     printf("#%2d   Room=%6d   Obj=%6d\n", i,
  650.         oroom2_1.rroom2[i - 1], oroom2_1.oroom2[i - 1]);
  651. /* L38100: */
  652.     }
  653.     goto L2000;
  654.  
  655.  
  656. /* DN-- DISPLAY SWITCHES */
  657.  
  658. L39000:
  659.     if (! (j > 0 && j <= smax && (k > 0 && k <= smax) && j <= k)) {
  660.     goto L2200;
  661.     }
  662. /*                         !VALID? */
  663.     i__1 = k;
  664.     for (i = j; i <= i__1; ++i) {
  665.     more_output(NULL);
  666.     printf("Switch #%-2d = %d\n", i, switch_[i - 1]);
  667. /* L39100: */
  668.     }
  669.     goto L2000;
  670.  
  671.  
  672. /* AN-- ALTER SWITCHES */
  673.  
  674. L40000:
  675.     if (! (j > 0 && j <= smax)) {
  676.     goto L2200;
  677.     }
  678. /*                         !VALID ENTRY? */
  679.     printf("Old= %6d      New= ", switch_[j - 1]);
  680.     (void) fflush(stdout);
  681.     (void) fgets(buf, sizeof buf, stdin);
  682.     more_input();
  683.     sscanf(buf, "%d", &switch_[j - 1]);
  684.     goto L2000;
  685.  
  686. /* DM-- DISPLAY MESSAGES */
  687.  
  688. L41000:
  689.     if (! (j > 0 && j <= rmsg_1.mlnt && (k > 0 && k <= rmsg_1.mlnt) && j <= k)
  690.         ) {
  691.     goto L2200;
  692.     }
  693. /*                         !VALID LIMITS? */
  694.     more_output("  RANGE   CONTENTS");
  695.     i__1 = k;
  696.     for (i = j; i <= i__1; i += 10) {
  697.     more_output(NULL);
  698. /* Computing MIN */
  699.     i__2 = i + 9;
  700.     l = min(i__2,k);
  701.     printf("%3d-%3d  ", i, l);
  702.     for (l1 = i; l1 <= l; ++l1)
  703.         printf(" %6d", rmsg_1.rtext[l1 - 1]);
  704.     printf("\n");
  705. /* L41100: */
  706.     }
  707.     goto L2000;
  708.  
  709.  
  710. /* DT-- DISPLAY TEXT */
  711.  
  712. L42000:
  713.     rspeak_(j);
  714.     goto L2000;
  715.  
  716. /* AH--    ALTER HERE */
  717.  
  718. L43000:
  719.     printf("Old= %6d      New= ", play_1.here);
  720.     (void) fflush(stdout);
  721.     (void) fgets(buf, sizeof buf, stdin);
  722.     more_input();
  723.     sscanf(buf, "%d", &play_1.here);
  724.     eqa[0] = play_1.here;
  725.     goto L2000;
  726.  
  727. /* DP--    DISPLAY PARSER STATE */
  728.  
  729. L44000:
  730.     more_output(NULL);
  731.     printf("ORPHS= %7d%7d%7d%7d%7d%7d\n",
  732.        orp[0], orp[1], orp[2], orp[3], orp[4], last_1.lastit);
  733.     more_output(NULL);
  734.     printf("PV=    %7d%7d%7d%7d%7d\n",
  735.        pvec[0], pvec[1], pvec[2], pvec[3], pvec[4]);
  736.     more_output(NULL);
  737.     printf("SYN=   %7d%7d%7d%7d%7d%7d\n",
  738.        syn[0], syn[1], syn[2], syn[3], syn[4], syn[5]);
  739.     more_output(NULL);
  740.     printf("              %7d%7d%7d%7d%7d\n",
  741.        syn[6], syn[7], syn[8], syn[9], syn[10]);
  742.     goto L2000;
  743.  
  744.  
  745. /* PD--    PROGRAM DETAIL DEBUG */
  746.  
  747. L45000:
  748.     printf("Old= %6d      New= ", debug_1.prsflg);
  749. /*                         !TYPE OLD, GET NEW. */
  750.     (void) fflush(stdout);
  751.     (void) fgets(buf, sizeof buf, stdin);
  752.     more_input();
  753.     sscanf(buf, "%d", &debug_1.prsflg);
  754.     goto L2000;
  755.  
  756. /* DZ--    DISPLAY PUZZLE ROOM */
  757.  
  758. L46000:
  759.     for (i = 1; i <= 64; i += 8) {
  760. /*                         !DISPLAY PUZZLE */
  761.     more_output(NULL);
  762.     printf(" ");
  763.     for (j = i; j <= i + 7; ++j)
  764.          printf("%3d", puzzle_1.cpvec[j - 1]);
  765.     printf("\n");
  766. /* L46100: */
  767.     }
  768.     goto L2000;
  769.  
  770.  
  771. /* AZ--    ALTER PUZZLE ROOM */
  772.  
  773. L47000:
  774.     if (! (j > 0 && j <= 64)) {
  775.     goto L2200;
  776.     }
  777. /*                         !VALID ENTRY? */
  778.     printf("Old= %6d      New= ", puzzle_1.cpvec[j - 1]);
  779. /*                         !OUTPUT OLD, */
  780.     (void) fflush(stdout);
  781.     (void) fgets(buf, sizeof buf, stdin);
  782.     more_input();
  783.     sscanf(buf, "%d", &puzzle_1.cpvec[j - 1]);
  784.     goto L2000;
  785.  
  786. } /* gdt_ */
  787.  
  788. #endif /* ALLOW_GDT */
  789.